home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form FrmLEDSample3
- Appearance = 0 'Flat
- BorderStyle = 1 'Fixed Single
- Caption = "LED - Bevel Sample"
- ClientHeight = 2595
- ClientLeft = 1425
- ClientTop = 2385
- ClientWidth = 5400
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 3000
- Left = 1365
- LinkTopic = "Form1"
- ScaleHeight = 2595
- ScaleWidth = 5400
- Top = 2040
- Width = 5520
- Begin VB.HScrollBar HScroll2
- Height = 255
- Left = 1200
- TabIndex = 1
- Top = 2160
- Width = 1575
- End
- Begin VB.HScrollBar HScroll1
- Height = 255
- Left = 1200
- TabIndex = 0
- Top = 1800
- Width = 1575
- End
- Begin LedLib.LED LED1
- Height = 1335
- Left = 240
- TabIndex = 7
- Top = 240
- Width = 1335
- _Version = 131072
- _ExtentX = 2355
- _ExtentY = 2355
- _StockProps = 64
- BevelInner = 3
- BevelShapeInner = 1
- BevelOuter = 1
- BevelShapeOuter = 0
- BevelWidthOuter = 1
- BevelWidthInner = 1
- BorderWidth = 4
- DisabledColor = 12632256
- OffColor = 8421504
- OnColor = 255
- Value = -1 'True
- End
- Begin VB.Label Label7
- Appearance = 0 'Flat
- Caption = $"leds3.frx":0000
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 9.75
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 1335
- Left = 1800
- TabIndex = 4
- Top = 240
- Width = 3375
- End
- Begin VB.Label Label5
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- Caption = "BevelInner:"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 255
- Left = 240
- TabIndex = 6
- Top = 2160
- Width = 975
- End
- Begin VB.Label Label4
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- Caption = "BevelOuter:"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 255
- Left = 240
- TabIndex = 5
- Top = 1800
- Width = 975
- End
- Begin VB.Label Label2
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- Caption = "Label2"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 255
- Left = 2880
- TabIndex = 3
- Top = 2160
- Width = 1815
- End
- Begin VB.Label Label1
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- Caption = "Label1"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 255
- Left = 2880
- TabIndex = 2
- Top = 1800
- Width = 1815
- End
- Attribute VB_Name = "FrmLEDSample3"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub Form_Load()
- HScroll1.Value = LED1.BevelOuter
- HScroll1.Min = 0
- HScroll1.Max = 4
- HScroll2.Value = LED1.BevelInner
- HScroll2.Min = 0
- HScroll2.Max = 4
- LED1.BevelWidthInner = 2
- LED1.BevelWidthOuter = 2
- LED1.BorderWidth = 4
- Call HScroll1_Change
- Call HScroll2_Change
- End Sub
- Private Function FormatBevel(BevelValue)
- Select Case BevelValue
- Case 0:
- FormatBevel = "None"
- Case 1:
- FormatBevel = "Raised"
- Case 2:
- FormatBevel = "Inset"
- Case 3:
- FormatBevel = "Lowered"
- Case 4:
- FormatBevel = "Solid"
- End Select
- End Function
- Private Sub HScroll1_Change()
- LED1.BevelOuter = HScroll1.Value
- Label1.Caption = FormatBevel(CInt(HScroll1.Value)) & " (" & HScroll1.Value & ")"
- End Sub
- Private Sub HScroll1_Scroll()
- Call HScroll1_Change
- End Sub
- Private Sub HScroll2_Change()
- LED1.BevelInner = HScroll2.Value
- Label2.Caption = FormatBevel(CInt(HScroll2.Value)) & " (" & HScroll2.Value & ")"
- End Sub
- Private Sub HScroll2_Scroll()
- Call HScroll2_Change
- End Sub
-